package com.chanjet.donkey.shop.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.chanjet.donkey.entity.IdEntity;

@Entity
@Table(name="shop_attribute")
public class Attribute extends IdEntity {
	private ShopCategory category;
	private String name;
	private int inputType;
	private int type;
	private String values;
	private int position;
	private boolean linked;
	
	private int group;
	@ManyToOne @JoinColumn(name="category_id")
	public ShopCategory getCategory() {
		return category;
	}
	public void setCategory(ShopCategory category) {
		this.category = category;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getInputType() {
		return inputType;
	}
	public void setInputType(int inputType) {
		this.inputType = inputType;
	}
	@Column(name="attr_type")
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	@Column(name="attr_values")
	public String getValues() {
		return values;
	}
	public void setValues(String values) {
		this.values = values;
	}
	public int getPosition() {
		return position;
	}
	public void setPosition(int position) {
		this.position = position;
	}
	
	public boolean isLinked() {
		return linked;
	}
	public void setLinked(boolean linked) {
		this.linked = linked;
	}
	@Column(name="attr_group")
	public int getGroup() {
		return group;
	}
	public void setGroup(int group) {
		this.group = group;
	}
	
}
